Skip to content

feat(frontend): enable edit item and improve mobile layout#63

Open
Edwz208 wants to merge 9 commits intomainfrom
feature/enable-edit-item-and-mobile-optimization
Open

feat(frontend): enable edit item and improve mobile layout#63
Edwz208 wants to merge 9 commits intomainfrom
feature/enable-edit-item-and-mobile-optimization

Conversation

@Edwz208
Copy link
Copy Markdown
Contributor

@Edwz208 Edwz208 commented Mar 22, 2026

Summary

Adds edit item functionality and improves layout for mobile screens to make item management easier. Does not configure/reconfigure add item or update location modals.

Related Issues

Changes

  • Added calls to API endpoints related to items
  • Added edit item functionality in item details page
  • Improved layout responsiveness for mobile to match Figma schema

How to Test

  1. Run frontend: npm run dev
  2. Go to admin catalogue
  3. Open an item
  4. Try editing fields and saving
  5. Resize to mobile view
  6. Verify layout looks correct
  7. Run npm test
  8. Run npm run lint

Screenshots / UI (if applicable)

  • After:
image image

Checklist

  • Tests added or updated
  • CI passes (lint, tests, build)
  • Documentation updated (if behavior changed)
  • No secrets or credentials committed

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the frontend item typings and filtering to prefer undefined over null, expands the items API client to support admin CRUD endpoints, and adds a small backend enhancement to expose box_code in public item serialization (plus some minor UI/CSS tweaks).

Changes:

  • Update catalogue filters to use undefined for “unset” values and align filter typing.
  • Replace PublicCollectionItem usage in some components with a new CollectionItem type and expand itemsApi with CRUD methods.
  • Backend: expose box_code on PublicCollectionItemSerializer.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/pages/public/CataloguePage.tsx Initializes catalogue filters using undefined values.
frontend/src/lib/types.ts Replaces placeholder item type(s) with ItemType/ItemStatus + new CollectionItem shape.
frontend/src/lib/filters.ts Changes filter field types and removes null from several filter params.
frontend/src/index.css Adds light-blue accent CSS variables.
frontend/src/components/layout/Header.css Hides .header-nav on small screens.
frontend/src/components/items/ItemList.tsx Switches item list typing to CollectionItem[].
frontend/src/components/items/ItemCard.tsx Switches item card typing to CollectionItem.
frontend/src/components/items/ItemDetailCard.tsx Adds a new item details card component.
frontend/src/components/items/DetailRow.tsx Adds a new reusable detail row component.
frontend/src/components/items/CatalogueSearchBar.tsx Uses undefined instead of null when clearing filters; adjusts search input handling.
frontend/src/components/common/Button.tsx Adds hideMobile prop to hide buttons on small screens.
frontend/src/api/items.api.ts Adds create/update/patch methods and changes item response typing/endpoint usage.
frontend/src/actions/useItems.ts Minor cleanup of queryFn comment.
backend/inventory/serializers.py Adds box_code to the public item serializer output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Edwz208 Edwz208 changed the title Initial commit feat(frontend): enable edit item and improve mobile layout Mar 26, 2026
Edwz208 and others added 2 commits March 26, 2026 13:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Edwz208 Edwz208 marked this pull request as ready for review March 26, 2026 17:40
@Edwz208 Edwz208 requested review from qiuethan and vivjd March 26, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile UI Optimization & Inline Editing

3 participants